Raspberry Pi 3 B+ WoA

This is a sequence of steps to create an Erlang development environment inside Windows Subsystem for Linux on Rapsberry Pi 3 B+. I'm using Windows 10 Insider 1903 build 18895 for both AMD64 and ARM64 host and device platforms.

TOC

— WOA: Install Windows on SD card
— WIN: Setup Windows
— PERF: Tune up Performance
— WSL: Install Linux
— ERL: Install Erlang

WOA

First of all I want to say even if you bought the device with radiators, SD card, and power adapter, this is still is not enough, you'll need SD card reader. The general idea is that WoA Deployer takes original WIM image and by using DISM commands, first apply this image to SD card, then apply drivers over vanilla Windows 10 Pro ARM64.

WOA-Project/WOA-Deployer-Rpi — 2.1.1

WIN

After flashing USB perform regular Windows Setup procedure and set up to boot from USB always at first in EFI.

PERF

As for Windows this is personal preferences, but in reality RP3B+ is better to use cmd.exe as a Shell instead of explorer.exe. Also disable any GPU GUI effects, disable Windows Defender in gpedit.msc, disable Windows Update, Windows Search, everything you find allocated too much CPU or MEM in taskmgr.exe. After all preparations you should see at most 10% CPU consumption in idle as GPU drivers is not accessible in RP3B+ WoA yet.

WSL

First of all install Ubuntu 18.04 Bionic Beaver from Windows Store. It could be painful but doable. As WSL2 just released we need to tune up a bit /etc/apt/apt.conf:

APT { Ignore { "gpg-pubkey"; } }; APT { Get { AllowUnauthenticated "yes"; }; }; Acquire::AllowInsecureRepositories "yes";

And also specify in /etc/apt/sources.list bionic ports with existing ARM64 binaries. NOTE: please use three lines for bionic, bionic-update, and bionic-security with all combination of channels: main, restricted, universe, multiverse.

deb [trusted=1] http://ports.ubuntu.com/ubuntu-ports/ bionic main universe deb [trusted=1] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main deb [trusted=1] http://ports.ubuntu.com/ubuntu-ports/ bionic-security main

Now you can do apt update and upgrade:

sudo apt update sudo apt upgrade

During update just ignore all the GPG errors at the end.

sudo apt install mc build-essential inotify-tools sudo apt install libssl-dev libncurses5-dev libncurses5 libtinfo5

ERL

Now we need to use kerl, the Erlang builder. Set config in ~/.kerlrc:

kerl/kerl

KERL_CONFIGURE_OPTIONS="--enable-threads --enable-smp-support \ --without-javac --enable-kernel-poll"

It will take hours to build Erlang on RP3B+!

Fix typo, introduce changes or put like for this page at: RP3B+ WoA
Discuss: https://github.com/5ht/tonpa.guru/issues/11